
<!DOCTYPE html>
<html class="no-js">
<head lang="en">

    <#include "../head_import.html" />

</head>
<body>
<#include "../include/top_nav.html">
    <div class="am-cf admin-main">

        <!-- sidebar start -->
        <#include "../order/left.html">
            <!-- sidebar end -->
            <!-- content start-->
            <div class="admin-content">
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><@s.m "global.position"/>: <@s.m "orderReturn.function"/> - <@s.m "global.list"/></div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form action="list.do">
                                <label><input type="radio" name="status" value="" onclick="chgStatus();" <#if !(status??)> checked="checked"</#if>/>所有</label>
                                <label><input type="radio" name="status" value="1" onclick="chgStatus();" <#if status??&&status=1> checked="checked"</#if>/>待审</label>
                                <label><input type="radio" name="status" value="2" onclick="chgStatus();" <#if status??&&status=2> checked="checked"</#if>/>已审</label>
                                <label><input type="radio" name="status" value="3" onclick="chgStatus();" <#if status??&&status=3> checked="checked"</#if>/>退回</label>
                                <label><input type="radio" name="status" value="4" onclick="chgStatus();" <#if status??&&status=4> checked="checked"</#if>/>待收货</label>
                                <label><input type="radio" name="status" value="5" onclick="chgStatus();" <#if status??&&status=5> checked="checked"</#if>/>已收货</label>
                                <label><input type="radio" name="status" value="6" onclick="chgStatus();" <#if status??&&status=6> checked="checked"</#if>/>已退款</label>
                                <label><input type="radio" name="status" value="7" onclick="chgStatus();" <#if status??&&status=7> checked="checked"</#if>/>已完成</label>

                        </form>
                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-sm-centered">
                        <form id="tableForm" method="post" class="am-form">
                            <input type="hidden" name="pageNo" value="${pageNo!}"/>
                            <@p.table value=pagination;orderReturn,i,has_next><#rt/>
                            <@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
                            <input type='checkbox' name='ids' value='${orderReturn.id}'/><#t/>
                        </@p.column><#t/>
                        <@p.column code="订单编号">${orderReturn.order.code}</@p.column><#t/>
                    <@p.column code="会员名">${orderReturn.order.member.username!}</@p.column><#t/>
                <@p.column code="order.createTime" style="width:100px;">${orderReturn.order.createTime}</@p.column><#t/>
                                    <@p.column code="order.shipping"><#if orderReturn.order.shipping??>${orderReturn.order.shipping.name}</#if></@p.column><#t/>
                                <@p.column code="order.payment"><#if orderReturn.order.payment??>${orderReturn.order.payment.name!}</#if></@p.column><#t/>
                            <@p.column code="order.status"><@s.m "order.status.${orderReturn.order.status}"/></@p.column><#t/>
                        <@p.column code="order.paymentStatus"><@s.m "order.paymentStatus.${orderReturn.order.paymentStatus}"/></@p.column><#t/>
                        <@p.column code="order.shippingStatus"><@s.m "order.shippingStatus.${orderReturn.order.shippingStatus}"/></@p.column><#t/>
                        <@p.column code="退款类型"><@s.m "orderReturn.returnType.${orderReturn.returnType!}"/></@p.column><#t/>
                        <@p.column code="申请时间">${orderReturn.createTime?string('yyyy-MM-dd HH:mm:ss')}</@p.column><#t/>
                        <@p.column code="状态"><@s.m "orderReturn.status.${orderReturn.status}"/></@p.column><#t/>
                        <@p.column code="global.operate" align="center">
                        <a href="view.do?id=${orderReturn.id}&pageNo=${pageNo!}">查看</a>|<#rt/>
                        <a href="o_delete.do?ids=${orderReturn.id}&pageNo=${pageNo!}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
                        </@p.column><#t/>
                        </@p.table>
                        <div><input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
                        </form>
            </div>
    </div>



    </div>

    </div>

<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = getTableForm();
	f.action="o_delete.do";
	f.submit();
}

function chgStatus() {
	var status = $("input[name=status]:checked").val();
	location.href="list.do?status=" + status;
}
</script>

<#include "/common/alert_message.html"/>
</body>
</html>